<?php

use app\api\controller\IndexController;
use app\api\controller\ModbusTcpController;
use app\api\controller\PlcController;
use Webman\Route;


Route::any('/index', [IndexController::class,'index']);
Route::any('/encode', [IndexController::class,'encode']);
Route::group('/index',function (){
    Route::any('/get_code',[IndexController::class,'get_code']);
});

Route::group('/modbus',function (){
    Route::any('/get',[ModbusTcpController::class,'getModbusTcpValue']);
    Route::any('/set',[ModbusTcpController::class,'setModbusTcpValue']);
    //Route::any('/rtu',[ModbusTcpController::class,'getRtu']);
    Route::any('/rtu',[ModbusTcpController::class,'getModbusRtuValue']);
});

Route::group('/plc',function (){
    Route::any('/index',[PlcController::class,'index']);
});
